
const requsts = require("/util/requst");
const util = require("/util/util");
Page({
  data: {
    msgboj:{},
    orderId:"",
    userId:"",
    placeholder:"--",
		isStuts:false,
		dataobj:{},
		ShipperCode:"",
		Traces:[],
    notongyi:"/image/landui.jpg"
  },
  onLoad(e){
    //this.faceVerifyfn()
    var param=e.orderId
    var that=this
    my.getStorage({
      key: 'userId',
      success: function(res) {
        console.log(res)
        that.setData({
          userId:res.data.userId,
          orderId:param
        })
        that.init()
      },
      fail: function(res){
      }
    });
  },
  init(){
    var param={
      userId:this.data.userId,
      orderId:this.data.orderId
    }
    my.showLoading({
      content: '加载中...',
    });
    var that=this
      my.request({
        url: requsts.url+"/order/getUserOrderDetail",
        method: 'POST',
        headers: {'content-type': 'application/x-www-form-urlencoded'},
        data:param,
        dataType: 'json',
        success: function(res) {
          console.log(res)
          my.hideLoading();
          if(res.data.code!=0){
              util.toastfn(res.data.msg)
              return
          }
          that.setData({
              msgboj:res.data.data,
							Traces:(res.data.data.expressContent.Traces).reverse(),
							dataobj:res.data.data.expressContent,
              ShipperCode:res.data.data.expressCompany
              // isbtn:res.data.data.status ShipperCode
          })
					
        },
        fail: function(res) {
            util.toastfn(res.errorMessage)
        },
      });
  },
  Rentalservices(){
			my.navigateTo({
				url:'/page/common/rentalservices/rentalservices?userId='+this.data.userId+'&orderId='+this.data.orderId,
			})
	}  
});